package com.xinfu.newproject.adapter.matter_repair_adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xinfu.newproject.R;
import com.xinfu.newproject.bean.matter_repair.QueryRepairPartsBean;

/**
 * https://github.com/CymChad/BaseRecyclerViewAdapterHelper
 */
public class RepairPartsAdapter extends BaseQuickAdapter<QueryRepairPartsBean.ResultBean, BaseViewHolder> {

    public RepairPartsAdapter() {
        super(R.layout.item_complaint_choose_type);
    }

    @Override
    protected void convert(BaseViewHolder helper, QueryRepairPartsBean.ResultBean item) {

        if (item.isCheck()) {
            helper.setTextColor(R.id.item_complaint_choose_type_tv, mContext.getResources().getColor(R.color.yellow_ff));
            helper.setBackgroundRes(R.id.item_complaint_choose_type_tv, R.drawable.no_bg_text);
        } else {
            helper.setTextColor(R.id.item_complaint_choose_type_tv, mContext.getResources().getColor(R.color.gray_6));
            helper.setBackgroundRes(R.id.item_complaint_choose_type_tv, R.drawable.no_bg_text_normal);
        }
        helper.setText(R.id.item_complaint_choose_type_tv, item.getRepairPart());

    }


}
